![]() |
ALMaSS
1.0
The Animal, Landscape and Man Simulation System
|
A class to hold an active goose foraging location and the number of birds of different types there. More...
#include <Goose_Population_Manager.h>
Public Member Functions | |
GooseActiveForageLocation (GooseSpeciesType a_type, int a_number, int a_polyref, int a_area, double a_graindensity, double a_maizedensity, double *a_grazing, Goose_Population_Manager *p_NPM) | |
Constructor for GooseActiveForageLocation. More... | |
void | SetArea (int a_area) |
Set the area in m. More... | |
double | GetArea () |
Get the area in m. More... | |
int | GetPolygonref () |
Get the landscape element ( LE ) reference number used by the Landscape class to identify this location. More... | |
int | GetMaxBirdsPresent () |
Sum of the maximum of all geese present (this may not be the same as the real maximum) More... | |
int | GetMaxSpBirdsPresent (GooseSpecies a_goose) |
Sum of the maximum of each goose species present (this may not be the same as the real maximum) More... | |
void | SetPolygonref (int a_polyref) |
Set the landscape element ( LE ) reference number used by the Landscape class to identify this location. More... | |
int | GetHuntables (void) |
Returns the number of huntable birds at the location. More... | |
int | GetGooseNumbers (void) |
Returns the total number of geese at the location. More... | |
double | GetGooseDensity (void) |
Returns the density of geese at the location. More... | |
int | GetBirds (GooseSpeciesType a_type) |
Get how many birds of a type. More... | |
int | GetBirds (GooseSpecies a_goose) |
Get how many birds of a species. More... | |
void | AddGeese (GooseSpeciesType a_type, int a_number) |
Adds geese to the location. More... | |
void | RemoveGeese (GooseSpeciesType a_type, int a_number) |
Removes geese to the location. More... | |
double | GetGrainDensity (void) |
Returns the current forage density (grain/m2) More... | |
void | SetGrainDensity (double a_density) |
Sets forage density (grain/m2) More... | |
double | GetMaizeDensity (void) |
Returns the current maize forage density (kJ/m2) More... | |
bool | GetHabitatType (void) |
Returns whether the current crop is a cereal. More... | |
void | SetMaizeDensity (double a_density) |
Sets maize forage density (kJ/m2) More... | |
double | GetGrazing (int gs) |
Returns the current forage rate kJ/min assuming no other geese affect this. More... | |
double | GetRoostDist (int gs) |
Returns the distance to the closest roost for gs. More... | |
double | GetGrazedBiomass (void) |
Returns the current grazing forage eaten in g. More... | |
void | SetGrazing (int gs, double a_density) |
Sets forage density (kJ/m2) More... | |
void | SetDistToClosestRoost (int gs, double a_dist) |
Sets the distance to the closest roost in meters. More... | |
void | ResetGrazing () |
Sets grazed biomass to zero. More... | |
void | RemoveGrainKJ (double a_kJ) |
Removes grain from the field as kJ. More... | |
void | RemoveMaizeKJ (double a_kJ) |
Removes maize from the field as kJ. More... | |
void | Graze (double a_kJ) |
Records forage removed as kJ from the field as grams. More... | |
void | ClearBirds () |
Empties the bird recording arrays. More... | |
void | UpdateKJ () |
Updates the grain or maize density based on the current total grain or maize amount. More... | |
Protected Attributes | |
int | m_polygonref |
A landscape element ( LE ) reference number used by the Landscape class to identify this location. More... | |
double | m_area |
The area of feeding location. More... | |
double | m_graindensity |
The grain density in kJ/m2. More... | |
double | m_maizedensity |
The maize density in kJ/m2. More... | |
double | m_grazingrate [gs_foobar] |
The grazing intake rate in kJ/min. More... | |
double | m_grazedbiomass |
Contains the total amount of grazing eaten today. More... | |
double | m_grainKJ_total |
The total grain kJ. More... | |
double | m_maizeKJ_total |
The total maize kJ. More... | |
TTypeOfMaxIntakeSource | m_HabitatType |
Whether it is a cereal crop, grass etc. More... | |
int | m_BirdsPresent [gst_foobar] |
An array holding the number of geese of different type i.e. Pinkfoot families, juvs, Barnacle families, juvs, Greylag familes, juvs. More... | |
int | m_MaxBirdsPresent [gst_foobar] |
An array holding the maximum number of geese of different types and total i.e. Pinkfoot families, juvs, Barnacle families, juvs, Greylag familes, juvs present on the field at one time for each day. More... | |
double | m_dist_to_closest_roost [gs_foobar] |
An array holding the distance to the closest roost. More... | |
Goose_Population_Manager * | m_OurPopulationManager |
This is a time saving pointer to the correct population manager object. More... | |
A class to hold an active goose foraging location and the number of birds of different types there.
GooseActiveForageLocation::GooseActiveForageLocation | ( | GooseSpeciesType | a_type, |
int | a_number, | ||
int | a_polyref, | ||
int | a_area, | ||
double | a_graindensity, | ||
double | a_maizedensity, | ||
double * | a_grazing, | ||
Goose_Population_Manager * | p_NPM | ||
) |
Constructor for GooseActiveForageLocation.
The grain density is measured in number of grains. To go from grains to grams we use the weight of a grain being 0.04
17.67 kJ/g dw grain & 0.04 grain/g
References AddGeese(), gst_foobar, m_BirdsPresent, m_grainKJ_total, m_HabitatType, m_maizeKJ_total, m_MaxBirdsPresent, m_OurPopulationManager, SetArea(), SetGrainDensity(), SetGrazing(), SetMaizeDensity(), SetPolygonref(), tomis_foobar, and UpdateKJ().
|
inline |
Adds geese to the location.
References m_BirdsPresent, and m_MaxBirdsPresent.
Referenced by GooseActiveForageLocation().
void GooseActiveForageLocation::ClearBirds | ( | ) |
Empties the bird recording arrays.
References g_land, gst_foobar, m_BirdsPresent, m_MaxBirdsPresent, and Landscape::Warn().
|
inline |
Get the area in m.
References m_area.
|
inline |
Get how many birds of a species.
References GetBirds(), gst_BarnacleFamilyGroup, gst_BarnacleNonBreeder, gst_GreylagFamilyGroup, gst_GreylagNonBreeder, gst_PinkfootFamilyGroup, and gst_PinkfootNonBreeder.
|
inline |
|
inline |
Returns the density of geese at the location.
References GetGooseNumbers().
|
inline |
Returns the total number of geese at the location.
References gst_foobar, and m_BirdsPresent.
Referenced by GetGooseDensity().
|
inline |
Returns the current forage density (grain/m2)
References m_graindensity.
Referenced by Goose_Base::st_ChooseForageLocation().
|
inline |
Returns the current grazing forage eaten in g.
References m_grazedbiomass.
|
inline |
Returns the current forage rate kJ/min assuming no other geese affect this.
References m_grazingrate.
Referenced by Goose_Base::st_ChooseForageLocation().
|
inline |
Returns whether the current crop is a cereal.
References m_HabitatType.
int GooseActiveForageLocation::GetHuntables | ( | void | ) |
Returns the number of huntable birds at the location.
References gst_GreylagFamilyGroup, gst_GreylagNonBreeder, gst_PinkfootFamilyGroup, gst_PinkfootNonBreeder, Goose_Population_Manager::InGreylagSeason(), Goose_Population_Manager::InPinkfootSeason(), m_BirdsPresent, and m_OurPopulationManager.
|
inline |
Returns the current maize forage density (kJ/m2)
References m_maizedensity.
Referenced by Goose_Base::st_ChooseForageLocation().
|
inline |
Sum of the maximum of all geese present (this may not be the same as the real maximum)
References gst_foobar, and m_MaxBirdsPresent.
|
inline |
Sum of the maximum of each goose species present (this may not be the same as the real maximum)
References gst_BarnacleFamilyGroup, gst_BarnacleNonBreeder, gst_GreylagFamilyGroup, gst_GreylagNonBreeder, gst_PinkfootFamilyGroup, gst_PinkfootNonBreeder, and m_MaxBirdsPresent.
|
inline |
Get the landscape element ( LE ) reference number used by the Landscape class to identify this location.
References m_polygonref.
Referenced by Goose_Base::st_ChooseForageLocation(), and Goose_Population_Manager::XYDump().
|
inline |
Returns the distance to the closest roost for gs.
References m_dist_to_closest_roost.
|
inline |
Records forage removed as kJ from the field as grams.
3.5 kJ/gram ww; Robbins 1993
References m_grazedbiomass.
|
inline |
Removes geese to the location.
References g_msg, m_BirdsPresent, and MapErrorMsg::Warn().
|
inline |
|
inline |
Removes maize from the field as kJ.
References m_maizeKJ_total.
|
inline |
Sets grazed biomass to zero.
References m_grazedbiomass.
Referenced by Goose_Population_Manager::NewForageLocation().
|
inline |
|
inline |
Sets the distance to the closest roost in meters.
References m_dist_to_closest_roost.
Referenced by Goose_Population_Manager::NewForageLocation().
|
inline |
Sets forage density (grain/m2)
References m_graindensity.
Referenced by GooseActiveForageLocation().
|
inline |
|
inline |
Sets maize forage density (kJ/m2)
References m_maizedensity.
Referenced by GooseActiveForageLocation().
|
inline |
Set the landscape element ( LE ) reference number used by the Landscape class to identify this location.
References m_polygonref.
Referenced by GooseActiveForageLocation().
|
inline |
Updates the grain or maize density based on the current total grain or maize amount.
17.67 kJ/g dw grain & 0.04 g/grain
References m_area, m_graindensity, m_grainKJ_total, m_maizedensity, and m_maizeKJ_total.
Referenced by GooseActiveForageLocation().
|
protected |
The area of feeding location.
Referenced by GetArea(), SetArea(), and UpdateKJ().
|
protected |
An array holding the number of geese of different type i.e. Pinkfoot families, juvs, Barnacle families, juvs, Greylag familes, juvs.
Referenced by AddGeese(), ClearBirds(), GetBirds(), GetGooseNumbers(), GetHuntables(), GooseActiveForageLocation(), and RemoveGeese().
|
protected |
An array holding the distance to the closest roost.
Referenced by GetRoostDist(), and SetDistToClosestRoost().
|
protected |
The grain density in kJ/m2.
Referenced by GetGrainDensity(), SetGrainDensity(), and UpdateKJ().
|
protected |
The total grain kJ.
Referenced by GooseActiveForageLocation(), RemoveGrainKJ(), and UpdateKJ().
|
protected |
Contains the total amount of grazing eaten today.
Referenced by GetGrazedBiomass(), Graze(), and ResetGrazing().
|
protected |
The grazing intake rate in kJ/min.
Referenced by GetGrazing(), and SetGrazing().
|
protected |
Whether it is a cereal crop, grass etc.
Referenced by GetHabitatType(), and GooseActiveForageLocation().
|
protected |
The maize density in kJ/m2.
Referenced by GetMaizeDensity(), SetMaizeDensity(), and UpdateKJ().
|
protected |
The total maize kJ.
Referenced by GooseActiveForageLocation(), RemoveMaizeKJ(), and UpdateKJ().
|
protected |
An array holding the maximum number of geese of different types and total i.e. Pinkfoot families, juvs, Barnacle families, juvs, Greylag familes, juvs present on the field at one time for each day.
Referenced by AddGeese(), ClearBirds(), GetMaxBirdsPresent(), GetMaxSpBirdsPresent(), and GooseActiveForageLocation().
|
protected |
This is a time saving pointer to the correct population manager object.
Referenced by GetHuntables(), and GooseActiveForageLocation().
|
protected |
A landscape element ( LE ) reference number used by the Landscape class to identify this location.
Referenced by GetPolygonref(), and SetPolygonref().